package org.edu.modules.jxrw.api;

import com.alibaba.fastjson.JSONObject;
import org.edu.common.api.vo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

//@FeignClient(name = "edu-common", url = "http://172.16.20.55:4010")
@FeignClient(name = "edu-common", url = "http://150.242.97.194:14010")
public interface CommonApi {
    public static final String COMMON_TOKEN_KEY = "09d5e1e7f9b049008eee645c783a1d67";


    @GetMapping("/common/veCommon/getStudentPageList")
    Result<JSONObject> getStudentPageList(@RequestParam("interfaceUserId") String interfaceUserId,
                                          @RequestParam(value = "bjId" , required = true) Integer bjId,
                                          @RequestParam(value = "pageSize",required = true) Integer pageSize);


    @GetMapping("/common/veCommon/queryBanJiById")
    Result<JSONObject> queryBanJiById(@RequestParam("interfaceUserId") String interfaceUserId,
                                      @RequestParam("banJiId") Integer banJiId);


    @GetMapping("/common/veCommon/queryBanJiListBySpecId")
    Result<List<JSONObject>> queryBanJiListBySpecId(@RequestParam("id") String id,
                                                    @RequestParam("specId") String specId);


    @GetMapping("/common/veCommon/queryTeacherByUserId")
    Result<JSONObject> queryTeacherByUserId(@RequestParam("id") String id,
                                            @RequestParam("userId") String userId);


    @GetMapping("/common/veCommon/querySemesterById")
    Result<JSONObject> querySemesterById(@RequestParam("interfaceUserId") String interfaceUserId,
                                         @RequestParam("semesterId") Integer semesterId);


    @GetMapping("/common/veCommon/querySpecialtyById")
    Result<JSONObject> querySpecialtyById(@RequestParam("interfaceUserId") String interfaceUserId,
                                          @RequestParam("specialtyId") Integer specialtyId);

}
